package com.example.demo.dto;

import com.diboot.core.binding.query.BindQuery;
import com.diboot.core.binding.query.Comparison;
import com.example.demo.entity.Orders;
import com.example.demo.entity.Customer;
import com.diboot.file.entity.UploadFile;
import com.example.demo.entity.Express;
import com.diboot.iam.entity.IamUser;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.List;

/**
* 订单 DTO定义
* @author MyName
* @version 1.0
* @date 2024-03-04
 * Copyright © MyCompany
*/
@Getter @Setter @Accessors(chain = true)
public class OrdersDTO extends Orders  {
    private static final long serialVersionUID = -182161560599586423L;

    /**
    * 关联字段 客户.名称：Customer.name
    */
    @BindQuery(comparison = Comparison.EQ, entity = Customer.class, field = "name", condition = "this.customer_id=id")
    private String customerName;
    /**
    * 关联字段 名字：Express.name
    */
    @BindQuery(comparison = Comparison.EQ, entity = Express.class, field = "name", condition = "this.express_id=id")
    private String expressName;
    /**
    * 关联字段 系统用户.真实姓名：IamUser.realname
    */
    @BindQuery(comparison = Comparison.EQ, entity = IamUser.class, field = "realname", condition = "this.create_by=id")
    private String createByName;
    /**
    * 关联字段 系统用户.真实姓名：IamUser.realname
    */
    @BindQuery(comparison = Comparison.EQ, entity = IamUser.class, field = "realname", condition = "this.update_by=id")
    private String updateByName;

    @BindQuery(comparison = Comparison.BETWEEN, field = "createTime")
    private List<String> createTimeList;
}
